Imports System.Threading

Module ThreadHash
    Public A As Thread
    Public B As Thread
    Public C As Thread

    Sub DisplayHash()
        Dim T As Thread
        Dim hash As Integer
        T = Thread.CurrentThread

        hash = T.GetHashCode()

        Console.Write("Thread name: {0}", Thread.CurrentThread.Name)
        Console.WriteLine(" Thread hash: {0}", hash.ToString())

    End Sub

    Sub Main()
        A = New Thread(AddressOf DisplayHash)
        B = New Thread(AddressOf DisplayHash)
        C = New Thread(AddressOf DisplayHash)

        A.Name = "A"
        A.Start()

        B.Name = "B"
        B.Start()

        C.Name = "C"
        C.Start()
        Console.ReadLine()  
    End Sub

End Module
